package com.qingke.OMS.Unit;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Properties;

public class GetProperties {
	
	private static GetProperties instance;
	private Properties p;
	
	private GetProperties(){
		p = new Properties();
		try {
			p.load(new FileInputStream("conn.properties"));
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}	
	}
	public static synchronized String getInstance(String key){	
		if(instance == null){
			instance = new GetProperties();	
		}
		return instance.p.getProperty(key);
	}
}
